#ifndef __APP_H__
#define __APP_H__

#include "main.h"
#include "gpio.h"
#include "usart.h"


#include "FreeRTOS.h"					 
#include "task.h" 
#include "event_groups.h"


typedef enum {FALSE = 0,TRUE = 1} bool;




/*************** GPS DATA *************/
#define REC_BUFF_LEN    256

//GPS Structure
#define GPS_Buffer_Length       80
#define UTCTime_Length          11
#define latitude_Length         11
#define N_S_Length              2    
#define longitude_Length        12
#define E_W_Length              2 
#define SPEED_Length            5

typedef struct SaveData 
{
	char GPS_Buffer[GPS_Buffer_Length];
	bool isGetData;		//是否获取到GPS数据
	bool isParseData;	//是否解析完成
	char UTCTime[UTCTime_Length];		//UTC时间
	char latitude[latitude_Length];		//纬度
	char N_S[N_S_Length];		//N/S
	char longitude[longitude_Length];		//经度
	char E_W[E_W_Length];		//E/W
    char Speed[SPEED_Length];
	char isUsefull;		//定位信息是否有效
} _GPSData;

/*************** GPS DATA *************/

#define     TIMEZONE    SHANGHAI
#define     SHANGHAI    (+8)




#define RTOS_UART_EVENT (1 << 0)



extern _GPSData GPSData;
extern EventGroupHandle_t uartDataCompleteHandle;



void app(void *pvParameters);
void display(void *pvParameters);




#endif

